package com.carol.lmsbe.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 创建易耗品明细请求
 */
@Data
public class ConsumableItemCreateRequest {

    @NotBlank(message = "物品名称不能为空")
    private String name;

    private String specification;

    @NotBlank(message = "单位不能为空")
    private String unit;

    @NotNull(message = "计划数量不能为空")
    @Positive(message = "计划数量必须大于0")
    private Integer plannedQuantity;

    @NotNull(message = "单价不能为空")
    @Positive(message = "单价必须大于0")
    private BigDecimal unitPrice;

}
